package com.mselivanov.vf5android;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class VF5Main extends ListActivity {
	
	private String[] menuItems = { "Commands", "Combos" };
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        setListAdapter(new ArrayAdapter<String>(this, 
        		android.R.layout.simple_list_item_1, menuItems));
    }

    @Override
    protected void onListItemClick(ListView l, View v, int position, long id) {
    	// start activity with character select
    	Intent intent = new Intent(this, CharacterSelectActivity.class);

    	// Put moves type into bundle and attach to intent
    	Bundle bundle = new Bundle();
    	bundle.putInt(CharacterSelectActivity.MOVES_TYPE_KEY, position);
    	intent.putExtras(bundle);
    	
    	startActivity(intent);
    }
}